<template>
  <div class="echartsMap" ref="echartsMap"></div>
</template>

<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import * as echarts from 'echarts'
import initMap from '@/echarts/echartsMap'
import china from '@/assets/json/china.json'

const echartsMap = ref()
onMounted(() => {
  echarts.registerMap('china', china) // 不晓得咋搞这个错误
  initMap(echarts.init(echartsMap.value))
})
</script>

<style lang="scss" scoped>
.echartsMap {
  width: 100%;
  height: 100%;
}
</style>
